Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make sure that private dependencies are correctly found in iDynTreeConfig.cmake when compiling as a static library #642

Merged
merged 1 commit into from
Jan 26, 2020

Conversation

traversaro
Copy link
Member

@traversaro traversaro commented Jan 26, 2020

Added find_dependency(OsqpEigen) and find_dependency(LibXml2) when iDynTree is compiled as a static library, fixing the use of iDynTree on Windows.

To reduce the possible unexpected problems, the automatic set of the IDYNTREE_USES_<pkg> CMake variable when the <pkg> CMake package is available in the system has
been removed for Irrlicht and WORHP, as it was already disabled for ASSIMP and ALGLIB.
To use this dependencies it is now compulsory to set manually the IDYNTREE_USES_<pkg> variable to ON.

This is an hotfix for the problem reported in robotology/unicycle-footstep-planner#33, but the problem has been fixed just for the dependencies that ship their own CMake config files, and so that can be found with find_dependency(<pkg>) without problems. Fixing the problem for libraries without cmake config files, such as IPOPT, is a bit more complex, as the FindIpopt.cmake file needs to be installed, and iDynTreeConfig.cmake fille need to be equipped with logic to load it (temporarly) in the CMAKE_CONFIG_PATH to ensure that find_dependency(IPOPT) will work as expected. For this reason, this is left to a future PR.

Added find_dependency(OsqpEigen) and find_dependency(LibXml2) when iDynTree is compiled as a static library, fixing the use of iDynTree on Windows (#642).

To reduce the possible unexpected problems, the automatic set of the `IDYNTREE_USES_<pkg>` CMake variable when the `<pkg>` CMake package is available in the system has
been removed for Irrlicht and WORHP, as it was already disabled for ASSIMP and ALGLIB (#642).
To use this dependencies it is now compulsory to set manually the `IDYNTREE_USES_<pkg>` variable to `ON`.
@traversaro traversaro merged commit 50d6d03 into master Jan 26, 2020
@traversaro traversaro deleted the fix-missing-find-dep-in-static branch January 26, 2020 14:33
GiulioRomualdi pushed a commit to GiulioRomualdi/idyntree that referenced this pull request Jan 28, 2020
Added find_dependency(OsqpEigen) and find_dependency(LibXml2) when iDynTree is compiled as a static library, fixing the use of iDynTree on Windows (robotology#642).

To reduce the possible unexpected problems, the automatic set of the `IDYNTREE_USES_<pkg>` CMake variable when the `<pkg>` CMake package is available in the system has
been removed for Irrlicht and WORHP, as it was already disabled for ASSIMP and ALGLIB (robotology#642).
To use this dependencies it is now compulsory to set manually the `IDYNTREE_USES_<pkg>` variable to `ON`.
S-Dafarra added a commit to S-Dafarra/bipedal-locomotion-framework that referenced this pull request May 7, 2020
It also change temporarily the module path in order to find packages that may not be available with find_package.
See robotology/idyntree#642 (comment)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants